package chap7;

import java.util.Scanner;

/**
 * @author oldliu
 * @since 1.0
 */
public class Triangle {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        //用*组成矩形
        System.out.println("输入三角形的高度：");
        int h=sc.nextInt();
        for (int i = 1; i <=h ; i++) {
            for(int j=h-i+1;j>=1;j--)
                System.out.print("*");

            System.out.println();
        }
    }
}
